<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>查看 - Powered by __CAOZHA-SYS-NAME__ __CAOZHA-SYS-VERSION__</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="__CAOZHA-LAYUIMINI__/lib/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__CAOZHA-LAYUIMINI__/css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
    <script src="__CAOZHA-STATIC__/js/jquery-3.4.1.min.js"></script>
    <script src="__CAOZHA-LAYUIMINI__/lib/layui/layui.js" charset="utf-8"></script>
    <script src="__CAOZHA-STATIC__/js/all.js"></script>
    <link rel="stylesheet" href="__CAOZHA-STATIC__/css/style.css" media="all">
</head>
<body>
<form class="layui-form layuimini-form caozha-view-form">
    <div class="layui-form-item">
        <label class="layui-form-label">用户组ID：</label>
        <div class="layui-input-block">
            {$member_group.groupid}
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">权限组名称：</label>
        <div class="layui-input-block">
            {$member_group.group_name}
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">拥有权限：</label>
        <div class="layui-input-block">

            <table class="layui-hide" id="show_roles_id" lay-filter="show_roles_filter"></table>

        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">是否启用：</label>
        <div class="layui-input-block">
            {$member_group.is_enabled|raw}
        </div>
    </div>

    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">备注信息：</label>
        <div class="layui-input-block">
            {$member_group.group_remarks}
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">排序：</label>
        <div class="layui-input-block">
            {$member_group.listorder}
        </div>
    </div>

</form>

<script>
    layui.use(['table'], function () {

        layer_skin(layer);

            var table = layui.table;
            table.render({
                elem: '#show_roles_id'
                ,url:'{:url(\'admin/member_group/getRolesConfigOne\')}?groupid={$member_group.groupid}'
                ,parseData: function (res) { //res 即为原始返回的数据
                    return {
                        "code": "0", //解析接口状态 res.status
                        "msg": "", //解析提示文本 res.message
                        "count": "", //解析数据长度
                        "data": res //解析数据列表
                    };
                }
                ,title: '权限表'
                //,totalRow: true
                ,even: false  //隔行背景
                ,size: ""//sm （小尺寸）       lg （大尺寸）
                ,cols: [[
                    {field: 'is_own', width: 100, title: '是否拥有', align: "center"}
                    ,{field:'name', title:'权限名称',width:250, minWidth:250}
                    ,{field:'role', title:'标识', width:150}
                    ,{field:'remarks', title:'描述'}
                ]]
                ,page: false,
				escape:false,//默认不转义html
            });

    });
</script>
</body>
</html>